package com.share.exam;

import java.util.Scanner;

/**
 * @desc:
 * @author:caifan
 * @date:2020/5/24
 */
public class Main3 {

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        while (in.hasNextLine()) {
            String line = in.nextLine();
            System.out.println(change(line));
        }

    }


    /**
     * 字符串大小写转换
     * @param line
     * @return
     */
    private static String change(String line) {
        char[] chars = line.toCharArray();
        StringBuffer buffer = new StringBuffer();
        for (char ch : chars) {
            if (ch >='a' && ch <= 'z') {
                buffer.append(Character.toUpperCase(ch));
            } else if (ch >= 'A' && ch <= 'Z') {
                buffer.append(Character.toLowerCase(ch));
            }
        }
        return buffer.toString();
    }

}
